-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEP: Deepdish to h5py #60
Conversation
* Haven't added any code for dealing with data_descriptors or correlation_descriptors fields (they are finnicky) * Updated h5py dependency to need >= v3.3.0 * Have not tested whatsoever
* Can now read in site file and convert to array format. * Still need to fix reading/writing array format.
* Bools stored as uint8 * Reading in arrays of strings requires some care
* Can now read/write array structured files. * Can also restructure freely between site and array files, both with BorealisRestructure and BorealisRead plus .records or .arrays
* Changed the method signature a bit for conciseness * Both methods open HDF5 file with 'a' permission (read/write if exists, create otherwise). This will raise an exception if the file already has groups/datasets with the same name, which I think is worthy of erroring on. * Changed borealis_restructure.py to also use the format writing methods.
* experiment_comment and slice_comment fields are sometimes empty, so we need to handle them in order to convert to DMAP
* Had to deal more carefully with empty string attributes, and saving string attributes to file.
Co-authored-by: Adam Lozinsky <[email protected]>
Co-authored-by: Theodore Kolkman <[email protected]>
Co-authored-by: Theodore Kolkman <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I left some code change comments that shorten up the if statements.
Co-authored-by: Adam Lozinsky <[email protected]>
Co-authored-by: Adam Lozinsky <[email protected]>
Co-authored-by: Adam Lozinsky <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues with 0.6.1 or 0.5 files given, and I've just thrown all borealis code I have at it with no errors. (I can't tick approve on my own PRs, but I approve 💯)
EDIT: oops sorry I was seconds late
import h5py | ||
import logging | ||
import os | ||
import subprocess as sp | ||
import warnings | ||
import numpy as np |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Numpy not used in this file?
import logging | ||
import numpy as np |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Numpy not used in file?
Scope
The deepdish library is not being maintained any longer so we are going to move to using h5py solely. Instances of deeepdish use in the borealis package need updating. This PR is to track those changes.
issue: #58
Approval
Number of approvals: 2
Test
Will provide when testing needed.
*Reminder: